<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
		<h1 class="title ui-widget-header ui-corner-all">Mantenimiento Comprobante</h1>
		<h:form id="frmComprobanteForm">
			<p:growl id="message" showDetail="true" />
			
			<h:panelGrid id="display" columns="2" style="margin-top:30px" >
				<h:outputText value="#{message['comprobante.codigo']}" />
				<h:panelGroup>
					<p:inputText value="#{comprobanteForm.objComprobanteSie.codcomprobante}" readonly="true" />
				</h:panelGroup>
			</h:panelGrid>
			<p:dataTable value="#{comprobanteForm.detComplist}" var="c"
				id="detcomproTable" paginator="true" rows="10"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="5,10,15" widgetVar="table"
					emptyMessage="No se encontro registros">
				
				<f:facet name="header">
					<h:outputLabel
						value="#{message['lista.detcomprobante.titulo']}" />
				</f:facet>
				
				<p:column headerText="#{message['comprobante.comprobante']}" >
					<h:outputText value="#{c.tbComprobante.codcomprobante}" />
				</p:column>
				
				<p:column headerText="#{message['comprobante.producto']}" >
					<h:outputText value="#{c.tbKardex.tbProducto.descripcionproducto}" />
				</p:column>
				
				<p:column headerText="#{message['comprobante.cantidad']}" >
					<h:outputText value="#{c.tbKardex.cantentrada}" />
				</p:column>
				
				<p:column headerText="#{message['comprobante.precio']}" >
					<h:outputText value="#{c.tbKardex.valortotal}" />
				</p:column>
				
				<p:column headerText="#{message['comprobante.observacion']}" >
					<h:outputText value="#{c.descripcion}" />
				</p:column>
				
				<p:column headerText="#{message['comprobante.fechaCreacion']}" >
					<h:outputText value="#{c.tbKardex.fechaCreacionString}" />
				</p:column>
				
			</p:dataTable>
			
			<h:panelGrid  columns="2" style="margin-top:20px">
				<h:outputText value="#{message['comprobante.montoTotal']}" />
				<h:panelGroup>
					<p:inputText value="#{comprobanteForm.montoTotal}" readonly="true" />
				</h:panelGroup>
			</h:panelGrid>
		 </h:form>
	</ui:define>
</ui:composition>